package com.zhou.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhou.domain.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface BookDao extends BaseMapper<Book> {
    //根据ID查询图书
    @Select("select * from books where id= #{bookId}")
    Book selectById(Integer bookId);

    //修改图书
    @Update("update books set title=#{title}, author=#{author},stock=#{stock},enStatus=#{enStatus} where id= #{id}")
    void updeta(Book book);
}
